package com.xzhuang.task.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.xzhuang.task.util.DBUtil;

@Controller
@RequestMapping("monitor")
public class MonitorController extends BaseController {
	
	
	@RequestMapping(value = "/add")
	@ResponseBody
	public String addTomcatConnectionMonitor(String types,String datetime,String connectionNum,String ip){
		try{
			DBUtil db = new DBUtil();
			db.insertMonitorItem(datetime,ip,connectionNum,types);
		}catch(Exception e){
			System.out.println("写入监控内容异常：------------------->: " + e + e.getMessage());
			return "0";
		}
		return "1";
	}
}
